/**
 * 
 */
package com.nassir.action;

import java.util.ArrayList;
import java.util.List;

import com.nassir.entity.User;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author nassir wen
 * @data 2012-1-6 下午05:48:26
 * @version V2.5
 * @Company: MSD.
 * @Copyright Copyright (c) 2012
 */
@SuppressWarnings("serial")
public class IndexAction extends ActionSupport {
    
    private List<User> userList;
    
    private String name;
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String hello() {
        name = "Hello, " + name + "!"; 
        return "hello";
    }
    
    public String list() {
        userList = new ArrayList<User>();
        userList.add(new User("10001", "10001用户"));
        userList.add(new User("10002", "10002用户"));
        userList.add(new User("10003", "10003用户"));
        userList.add(new User("10004", "10004用户"));
        userList.add(new User("10005", "10005用户"));
        userList.add(new User("10006", "10006用户"));
        userList.add(new User("10001", "10001用户"));
        userList.add(new User("10002", "10002用户"));
        userList.add(new User("10003", "10003用户"));
        userList.add(new User("10004", "10004用户"));
        userList.add(new User("10005", "10005用户"));
        userList.add(new User("10006", "10006用户"));
        return "list";
    }

    public List<User> getUserList() {
        return userList;
    }

    public void setUserList(List<User> userList) {
        this.userList = userList;
    }

    
}
